package com.singzi.designPattern.decorator;

public class Finery extends Person {
    private Person component;

    public void Decorate(Person component) {
        this.component = component;
    }

    @Override
    public void show() {
        if(component != null){
            component.show();
        }
    }
}
class TShirts extends Finery{
    @Override
    public void show() {
        System.out.print("大T恤 ");
        super.show();
    }
}
class BigTrouser extends Finery{
    @Override
    public void show() {
        System.out.print("垮裤 ");
        super.show();
    }
}
class Sneakers extends Finery{
    @Override
    public void show() {
        System.out.print("破球鞋 ");
        super.show();
    }
}